<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/3/14
 * Time: 21:33
 */

namespace backend\services;


use backend\models\AuthItem;
use common\services\BasicService;

class AuthItemService extends BasicService
{
    /**
     * 获取角色列表
     * @param array $map
     * @return array|\yii\db\ActiveRecord[]
     */
    public function getRoles($map = [])
    {
        if(!$map){
            $map = ['type'=>1];
        }
        $roles = AuthItem::find()->where($map)->asArray()->all();
        return $roles;
    }

}